﻿using 订单处理系统.Entity;
using 订单处理系统.Model;

namespace 订单处理系统.Repository
{
    public class OrderRepository
    {
        private OrderDbContext db;

        public OrderRepository(OrderDbContext db)
        {
            this.db = db;
        }

        public async Task Add(Order order)
        {
            db.Add(order);
            await db.SaveChangesAsync();
            return;
        }

        public async Task Update(Order order)
        {
            db.Update(order);
            await db.SaveChangesAsync();
            return;
        }
    }
}